package com.jp2p.admin.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.jp2p.admin.service.AdminUserService;
import com.jp2p.entity.AdminUser;

@Controller
public class AdminUserController {
	@Autowired
	private AdminUserService adminUserService;
	
	@RequestMapping(value="/")
	@ResponseBody
	public String index(){
		
		return "hello world!";
	}
	
	@RequestMapping(value="/adminUser/{adminUserId}")
	@ResponseBody
	public AdminUser queryAdminUser(@PathVariable("adminUserId")int adminUserId){
		
		return adminUserService.getAdminUser(adminUserId);
	}
	
}
